import request from '@/utils/request.js'
//查询权益卡列表
export function getQykList() {
  return request({
    url: '/app/wx/qyk/list',
    method: 'get'
  })
}
//查询权益卡列表
export function getInfo(id) {
  return request({
    url: '/app/wx/qyk/getInfo/'+id,
    method: 'get'
  })
}
//查询权益项列表
export function getQyxList() {
  return request({
    url: '/app/wx/qyx/list',
    method: 'get'
  })
}
//查询用户权益余额
export function getQy(wxUserId) {
  return request({
    url: '/app/wx/userQy/get?wxUserId='+wxUserId,
    method: 'get'
  })
}
//创建权益卡订单
export function createQyxOrder(qykId, wxUserId) {
  return request({
    url: '/app/order/qyk/create?qykId='+qykId+'&&wxUserId='+wxUserId,
    method: 'get'
  })
}
//权益卡订单付款成功
export function checkQyxOrder(orderId) {
  return request({
    url: '/app/order/qyk/paySuccess?orderId='+orderId,
    method: 'get'
  })
}

//创建权益卡订单
export function createSnpQykOrder(qykId, wxUserId,yppUserId,userName) {
  return request({
    url: '/app/order/qyk/snp/create?qykId='+qykId+'&&wxUserId='+wxUserId+"&&yppUserId="+yppUserId+"&&userName="+userName,
    method: 'get'
  })
}
//权益卡订单付款成功
export function checkSnpQykOrder(orderId) {
  return request({
    url: '/app/order/qyk/snp/paySuccess?orderId='+orderId,
    method: 'get'
  })
}

//查询权益卡列表
export function listQykDetail(query) {
  return request({
    url: '/app/wx/qyk/detail/list',
    method: 'get',
	params:query
  })
}


